/*
 * @Author: 王鹏 2911783749@qq.com
 * @Date: 2022-11-07 08:48:50
 * @LastEditors: 王鹏 2911783749@qq.com
 * @LastEditTime: 2022-11-07 18:33:58
 * @FilePath: \vue3Mixiu\code\vite.config.ts
 * @Description: 
 */
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// 按需引入插件
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'


// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue(),
    AutoImport({
      resolvers: [ElementPlusResolver()],
    }),
    Components({
      resolvers: [ElementPlusResolver()],
    }),],
    server:{
      proxy:{
        "/api":{
          target:"https://www.thenewstep.cn/v1/vue3system",
          secure:false, //跳过https检查
          changeOrigin:true  //开启跨域
        }
      }
    }
})
